package com.dreamsail.core.model.system;


import com.dreamsail.core.constant.ErrorMessage;
import lombok.AllArgsConstructor;
import lombok.Data;

@Data
@AllArgsConstructor
public class BaseException extends RuntimeException{
    //  错误码
    private int code;

    // 返回消息
    private String msg;


    public BaseException(ErrorMessage errorMessage) {
        this.code = errorMessage.getCode();
        this.msg = errorMessage.getMsg();
    }
}
